<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.css" rel="stylesheet" />
		<style type="text/css">
			.titlemenu{
				/* 底部group的高度为此高度+38的标题高度 */
				padding-top: 100px;
			}
			.mui-scroll .mui-active{
				border-bottom: 3px solid #007AFF;
			}
			.mui-control-item{
			    color: #000000;
				background: none;
			}
		</style>
	</head>

	<body style="background-color: #242424">
			<div class="titlemenu">
				<div class="mui-content">
					<div id="slider" class="mui-slider">
						<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-segmented-control mui-slider-indicator">
							<div class="mui-scroll">
								<a class="mui-control-item mui-active" href="#item1mobile" data-wid="tab-top-subpage-1.html">
									好友
								</a>
								<a class="mui-control-item" href="#item2mobile" data-wid="tab-top-subpage-2.html">
									群聊
								</a>
								<a class="mui-control-item" href="#item3mobile" data-wid="tab-top-subpage-3.html">
									通讯录
								</a>
								<a class="mui-control-item" href="#item4mobile" data-wid="tab-top-subpage-4.html">
									公众号
								</a>
							</div>
						</div>
				
					</div>
				</div>
			</div>
		
		<script src="../../js/mui.js"></script>
		<script src="../../js/webviewGroup.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			mui.init();
			mui.plusReady(function() {
				var _self = plus.webview.currentWebview();
				var group = new webviewGroup(_self.id,{
					topheight: "138",
					items: [{
						id: "tab-top-subpage-1.html",
						url: "../linkman/tab-top-subpage-1.html",
						extras: {}
					}, {
						id: "tab-top-subpage-2.html",
						url: "../linkman/tab-top-subpage-2.html",
						extras: {}
					}, {
						id: "tab-top-subpage-3.html",
						url: "../linkman/tab-top-subpage-3.html",
						extras: {}
					}, {
						id: "tab-top-subpage-4.html",
						url: "../linkman/tab-top-subpage-4.html",
						extras: {}
					}],
					onChange: function(obj) {
						var c = document.querySelector(".mui-control-item.mui-active");
						if(c) {
							c.classList.remove("mui-active");
						}
						var target = document.querySelector(".mui-scroll .mui-control-item:nth-child(" + (parseInt(obj.index) + 1) + ")");
						target.classList.add("mui-active");
						if(target.scrollIntoView) {
							target.scrollIntoView();
						}
					}
				});
				mui(".mui-scroll").on("tap", ".mui-control-item", function(e) {
					var wid = this.getAttribute("data-wid");
					group.switchTab(wid);
				});
			
			});
		</script>
	</body>

</html>
